
/*************************************************
描述：缩略图上传后列表
作者：Vigour
时间：2011-10-24
*************************************************/
function uploadImg(src1, src2, src3, src4) {
    var $uploadImgState = $("#uploadImgState li");
    var j = $uploadImgState.length + 1;
    var len = $uploadImgState.length + 1 + "add";
    var AddImg = "";
    AddImg = "<li id=\"li" + len + "\" style=\"list-style-type:none;border:3px #e2e2e2 solid; margin:5px 5px 5px 0px; padding:2px 2px 2px 2px; float:left\">";
    AddImg += "<span>";
    AddImg += "<img alt=\"\" src=\"/UploadFile/Product/" + src1 + "\" width=\"70px\" height=\"70px\" id=\"ImgPic" +  len + "\" onclick=\"SelectImg('" + len + "','" + src2 + "')\"/>";
    AddImg += "<input type=\"hidden\" id=\"PicAddressA" + len + "\" name=\"PicAddressA\" value=\"" + src1 + "\"  />";
    AddImg += "<input type=\"hidden\" id=\"PicAddressB" + len + "\" name=\"PicAddressB\" value=\"" + src2 + "\"  />";
    AddImg += "<input type=\"hidden\" id=\"PicAddressC" + len + "\" name=\"PicAddressC\" value=\"" + src3 + "\"  />";
    AddImg += "<input type=\"hidden\" id=\"PicAddressD" + len + "\" name=\"PicAddressD\" value=\"" + src4 + "\"  />"; //原始图片
    AddImg += "<input id=\"cbUploadImg" + len + "\" type=\"checkbox\" checked=\"checked\" name=\"cbUploadImg\" class=\"Display\" />";
    AddImg += "</span>";
    AddImg += "<br /><span id=\"" + j + "\"><a href=\"javascript:void(0)\" class=\"up" + len + "\" onclick=\"up('" + len + "')\"><img src=\"/Admin/Images/up.jpg\" border=\"0\" /></a><a href=\"javascript:void(0)\" class=\"down" + len + "\" onclick=\"down('" + len + "')\"><img src=\"/Admin/Images/down.jpg\" border=\"0\" /></a><a href=\"javascript:void(0)\" class=\"del" + len + "\" onclick=\"del('" + len + "')\"><img src=\"/Admin/Images/delete.jpg\" border=\"0\" /></a></span>";
    AddImg += " </li>";
    $("#uploadImgState").append(AddImg);
}

/*************************************************
描述：选择图片
作者：Vigour
时间：2011-10-24
*************************************************/
function SelectImg(index, src) {
    $("#txtImgProLoad").remove();
    var InputImgProLoad = " <input id=\"txtImgProLoad\" name=\"txtImgProLoad\" type=\"hidden\" value=\"" + src + "\" />";
    $("#ImgProLoad").append(InputImgProLoad);
    $(" li img").css("border", "");
    $("#ImgPic" + index + "").css("border", "1px solid red");
}

/*************************************************
描述：缩略图上移
作者：Vigour
时间：2011-10-24
*************************************************/
function up(len) {
    var onthis = $(".up" + len + "").parent("span").parent("li");
    var getup = $(".up" + len + "").parent("span").parent("li").prev();
    $(getup).before(onthis);
}

/*************************************************
描述：缩略图下移
作者：Vigour
时间：2011-10-24
*************************************************/
function down(len) {
    var onthis = $(".down" + len + "").parent("span").parent("li");
    var getdown = $(".down" + len + "").parent("span").parent("li").next();
    $(getdown).after(onthis);
}

/*************************************************
描述：缩略图删除
作者：Vigour
时间：2011-10-24
*************************************************/
function del(len) {
    var onthis = $(".del" + len + "").parent("span").parent("li");
    onthis.remove()
}